//
//  WatipayCell.m
//  FKGW
//
//  Created by song ce on 2017/2/22.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "WatipayCell.h"
#import "UIView+Extend.h"
#import "OSSHelper.h"
@implementation WatipayCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle= UITableViewCellSelectionStyleNone;

    //店铺名称
    self.shopNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 10, 0, 21)];
    self.shopNameLabel.textColor = DEF_COLOR102;
    self.shopNameLabel.font = [UIFont systemFontOfSize:14];
    NSString *content=@"齐悦家具店";
    self.shopNameLabel.text = content;
    [self.shopNameLabel sizeToFit];
    [self.contentView addSubview:self.shopNameLabel];
    
    //指示图片
    self.indicatorImageV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_gouwuche_jinru"]];
    self.indicatorImageV.left = self.shopNameLabel.right +5;
    self.indicatorImageV.top  = 13;
    [self.contentView addSubview:self.indicatorImageV];

}

-(void)setModel:(WatitPayModel *)model{
    _model= model;
    [[OSSHelper sharedHelper] OSSDownLoadWithObjectKey:_model.pPic downLoadBlock:^(NSData *data) {
        dispatch_async(dispatch_get_main_queue(), ^{
            self.goodsImgeView.image = [UIImage imageWithData:data];
        });
    }];
    self.goodsNameLabel.text = _model.pName;
    self.priceLabel.text = _model.pPrice;
    self.standardLabel.text = _model.pProperty;
    self.countLabel.text = _model.pNum;
}

//付款
- (IBAction)pay:(UIButton *)sender {
    

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
